package zuoye28.zuoye3;

import java.util.Scanner;

public class Teat {
    public static void main(String[] args) throws Exception{
        Scanner in = new Scanner(System.in);
        System.out.println("请输入姓名");
        System.out.println("请输入学校");
        System.out.println("请输入年纪");
        String box = in.next();
        String box2 = in.next();
        double box3 = in.nextDouble();
        Teacher teacher =new Teacher();

        try {
            if(box3<22){
                throw new Exception("年龄小于22，你是个假货");
            }
        }catch (Exception e){
            e.printStackTrace();
        }
        finally {
            if(!(box3<22)){
                System.out.println("姓名"+box+"学校"+box2+"年纪"+box3);
                teacher.shangke();
            }

        }
    }
}
